############################################################
##     Background information for data replication        ##
##                                                        ##
##                 MacOS Sonoma 14.1.1                    ##
##   R version 4.3.1 GUI 1.79 Big Sur Intel build (8238)  ##
##              RStudio version 2023.09.1+494             ##
############################################################


rm(list=ls(all=TRUE)) 

# Install and load packages
packages <- c("readxl", "interplot", "ggplot2", "ggeffects", "plyr", "patchwork", "interplot",  "coefplot", "tidyverse", "foreign", "Hmisc", "plotMElm", "dplyr", "knitr", "kableExtra","stargazer","dotwhisker", "broom", "MASS", "lme4", "haven", "radiant", "psych", "magrittr", "lmtest", "multiwayvcov", "graphics", "xtable", "clubSandwich", "sjPlot", "sjmisc", "ordinal", "effects", "lattice", "margins", "texreg", "foreach", "ggpubr", "sandwich", "pglm", "plm", "magick")
invisible(lapply(packages, function(x) if (!require(x, character.only=T)){install.packages(x);library(x, character.only = T)}))



############################################################################
###### Appendix A.	Illustrating the use of word “dedazo” in Mexico #######
##############################################################################  

datosreforma <- read_excel("Data_Reforma_Appendix A.xlsx", sheet = 1) 
summary(datosreforma)

datosreforma2018 <- read_excel("Data_Reforma_Appendix A.xlsx", sheet = 2) 
summary(datosreforma2018)

### CREATE FIGURE A01----
ggpooledREFORMA <- ggplot(datosreforma, aes(x = Year, y = Number)) +
  geom_point(size=1.5) +
  geom_smooth(method = "loess", alpha = 0.15, lty = "dashed", lwd=0.9) +
  geom_line(lwd=1) +
  scale_x_continuous(limits = c(1995,2022), breaks = c(1995,2000,2005,2010,2015,2020), "\n Year") +
  scale_y_continuous(limits = c(0,600), "Number of items in Reforma that use the word 'dedazo'\n") +
  theme_bw() +
  theme(strip.text.x = element_text(size=12),
        axis.title.x = element_text(size=12),
        axis.title.y = element_text(size=12),
        axis.text.y = element_text(size=12),
        axis.text.x = element_text(size=12),
        legend.direction = "horizontal", legend.position = "bottom",
        legend.text = element_text(size=11),
        legend.title = element_text(size=11)) +
  guides(color = guide_legend(title.position="top", title.hjust=.5, keywidth = 2, keyheight = 1, reverse=FALSE)) 
ggpooledREFORMA

ggsave("TimeSeriesREFORMA.pdf", width = 8, height = 5, units = "in")


### CREATE TABLE A01----
datosreforma2018 %>% 
  summarise(across(candidate_selection:other_notpolitical, sum))

### CREATE TABLE A02----
datosreforma2018 %>% count(party_actor)





######################################
###### Survey experiment data #######
#######################################

data<-read.csv("PB_nomination_replication_data.csv", header=TRUE, stringsAsFactors=FALSE, row.names=NULL)

# Age
data$age<-NA
for (i in 1:length(data$Q1)){
  if (data$Q1[i]==1){
    if (is.na(data$Q1.1[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1[i]}
  }
  if (data$Q1[i]==2){
    if (is.na(data$Q1.1.1[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1.1[i]}
  }
  if (data$Q1[i]==3){
    if (is.na(data$Q1.1.2[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1.2[i]}
  }
  if (data$Q1[i]==4){
    if (is.na(data$Q1.1.3[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1.3[i]}
  }
  if (data$Q1[i]==5){
    if (is.na(data$Q1.1.4[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1.4[i]}
  }
  if (data$Q1[i]==6){
    if (is.na(data$Q1.1.5[i])){data$age[i]<-data$age[i]}
    else {data$age[i]<-data$Q1.1.5[i]}
  }
}
table(data$age)

# residential area
data$area<-data$Q2
data$mexico_city <- ifelse(data$Q2==9, 1, 0)
table(data$mexico_city)

# Male
data$male<-data$Q4
data$male[data$Q4==99]<-NA
table(data$male)

# Education
data$education<-data$Q5
data$education[data$Q5==99]<-NA
table(data$education)


# Jobs
data$full_time_job<-NA
data$full_time_job[data$Q6==0 | data$Q6==1 |data$Q6==3 ] <-0
data$full_time_job[data$Q6==2 ] <-1
table(data$full_time_job)

data$part_time_job<-NA
data$part_time_job[data$Q6==0 | data$Q6==2 |data$Q6==3 ] <-0
data$part_time_job[data$Q6==1 ] <-1
table(data$part_time_job)

# Monthly income
data$income<-data$Q7
data$income[data$Q7==99] <-NA
table(data$income)

# Catholic
data$catholic<-NA
data$catholic[data$Q8==0 | data$Q8==2 | data$Q8==3 | data$Q8==4 | data$Q8==5 | data$Q8==6 | data$Q8==7]<-0
data$catholic[data$Q8==1] <-1
table(data$catholic)

# Trust
data$trust_neighbor<-data$Q9.1_4
data$trust_neighbor[data$Q9.1_4==99] <-NA
table(data$trust_neighbor)

data$trust_president<-data$Q9.2_1
data$trust_president[data$Q9.2_1==99] <-NA
table(data$trust_president)

data$trust_party<-data$Q9.2_9
data$trust_party[data$Q9.2_9==99] <-NA
table(data$trust_party)

## proxy of ideology
data$anti_immigrant <- data$Q10_1 
data$anti_immigrant [data$anti_immigrant == 99 ] <- NA
table(data$anti_immigrant)

data$mother_should_care_children <- data$Q10_2
data$mother_should_care_children [data$mother_should_care_children == 99 ] <- NA
table(data$mother_should_care_children )

data$older_people_less_respected_thesedays <- data$Q10_3
data$older_people_less_respected_thesedays [ data$older_people_less_respected_thesedays == 99 ] <- NA
table(data$older_people_less_respected_thesedays)

data$university_priority_boy <- data$Q10_4
data$university_priority_boy [ data$university_priority_boy == 99 ] <- NA
table(data$university_priority_boy)

data$men_more_suitable_leader <- data$Q10_6
data$men_more_suitable_leader [ data$men_more_suitable_leader == 99 ] <- NA
table(data$men_more_suitable_leader)

cols.id = c("anti_immigrant", "mother_should_care_children", "older_people_less_respected_thesedays", "university_priority_boy", "men_more_suitable_leader")
data$proxy_conservative<-rowMeans(data[,cols.id], na.rm=FALSE) 
data$proxy_conservative <- data$proxy_conservative -1
summary(data$proxy_conservative)
table(data$proxy_conservative)

## Positive reciprocity
data$positive_reciprocity<-data$Q11
data$positive_reciprocity[data$Q11==99] <-NA
table(data$positive_reciprocity)

## turnout in the 2018 elections
data$turnout_2018_election<-data$Q14
data$turnout_2018_election[data$Q14==1] <-0
data$turnout_2018_election[data$Q14==2] <-1
data$turnout_2018_election[data$Q14==99] <-NA
table(data$turnout_2018_election)

## Satisfaction with the 2018 election result (Reversed)
data$satisfaction_2018_election_result<-data$Q16
data$satisfaction_2018_election_result[data$Q16==99]<-NA
data$satisfaction_2018_election_result<-5-data$satisfaction_2018_election_result
table(data$satisfaction_2018_election_result)

## belief in vote confidentiality (Reversed)
data$belief_vote_confidentiality <-data$Q19
data$belief_vote_confidentiality[data$Q19==99] <-NA
data$belief_vote_confidentiality <- 4-data$belief_vote_confidentiality
table(data$belief_vote_confidentiality)

## Q28
data$know.Ruben.Alfredo.Torres.Zavala <-data$Q28_4 #
data$know.Reynaldo.Francisco.Valdes.Manzo <-data$Q28_5 #
data$know.Jose.Erandi.Bermudez.Mendez <-data$Q28_9 #
data$know.Enrique.Torres.Cuadros <-data$Q28_10 #

data$know.Ruben.Alfredo.Torres.Zavala[data$know.Ruben.Alfredo.Torres.Zavala==99] <-NA #
data$know.Reynaldo.Francisco.Valdes.Manzo[data$know.Reynaldo.Francisco.Valdes.Manzo==99] <-NA #
data$know.Jose.Erandi.Bermudez.Mendez[data$know.Jose.Erandi.Bermudez.Mendez==99] <-NA #
data$know.Enrique.Torres.Cuadros[data$know.Enrique.Torres.Cuadros==99] <-NA #

summary(data$know.Ruben.Alfredo.Torres.Zavala)
summary(data$know.Reynaldo.Francisco.Valdes.Manzo)
summary(data$know.Jose.Erandi.Bermudez.Mendez)
summary(data$know.Enrique.Torres.Cuadros)

# Q31
data$exp_condition_nomination <-NA
data$pair <-NA  ## pair = 1 is PAN, pair=2 is PRD

for (i in 1:nrow(data)){
  if (!is.na(data$Q31.1.1A_1[i])){
    data$exp_condition_nomination[i]<-"A"
    data$pair[i]<- 1
  }
  if (!is.na(data$Q31.1.1B_1[i])){
    data$exp_condition_nomination[i]<-"B"
    data$pair[i]<- 1
  }
  if (!is.na(data$Q31.1.1C_1[i])){
    data$exp_condition_nomination[i]<-"C"
    data$pair[i]<- 1
  }
  if (!is.na(data$Q31.1.1D_1[i])){
    data$exp_condition_nomination[i]<-"D"
    data$pair[i]<- 1
  }
  if (!is.na(data$Q31.1.1E_1[i])){
    data$exp_condition_nomination[i]<-"E"
    data$pair[i]<- 1
  }
}

for (i in 1:nrow(data)){
  if (!is.na(data$Q31.1.2A_1[i])){
    data$exp_condition_nomination[i]<-"A"
    data$pair[i]<- 2
  }
  if (!is.na(data$Q31.1.2B_1[i])){
    data$exp_condition_nomination[i]<-"B"
    data$pair[i]<- 2
  }
  if (!is.na(data$Q31.1.2C_1[i])){
    data$exp_condition_nomination[i]<-"C"
    data$pair[i]<- 2
  }
  if (!is.na(data$Q31.1.2D_1[i])){
    data$exp_condition_nomination[i]<-"D"
    data$pair[i]<- 2
  }
  if (!is.na(data$Q31.1.2E_1[i])){
    data$exp_condition_nomination[i]<-"E"
    data$pair[i]<- 2
  }
}
table(data$exp_condition_nomination, data$pair)

data$Q31_manipulation_appointment <- ifelse(data$exp_condition_nomination=="B" | data$exp_condition_nomination=="D" | data$exp_condition_nomination=="E", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_appointment)
data$Q31_manipulation_primary <- ifelse(data$Q31_manipulation_appointment == 1, 0, 1)
table(data$exp_condition_nomination, data$Q31_manipulation_primary)
data$Q31_manipulation_information <- ifelse(data$exp_condition_nomination=="C" | data$exp_condition_nomination=="D" | data$exp_condition_nomination=="E", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_information)
table(data$Q31_manipulation_appointment, data$Q31_manipulation_information)
data$Q31_manipulation_information_noslang <- ifelse(data$exp_condition_nomination=="D", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_information_noslang)
data$Q31_manipulation_information_slang <- ifelse(data$exp_condition_nomination=="E", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_information_slang)
data$Q31_manipulation_information_primary <- ifelse(data$exp_condition_nomination=="C", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_information_primary)
data$Q31_manipulation_information_appointment <- ifelse(data$exp_condition_nomination=="D"| data$exp_condition_nomination=="E", 1, 0)
table(data$exp_condition_nomination, data$Q31_manipulation_information_appointment)

data$Q31_know_politician <- NA
for (i in 1:nrow(data)){
  if (data$exp_condition_nomination[i]=="A" & data$pair[i]==1){data$Q31_know_politician[i] <- data$know.Jose.Erandi.Bermudez.Mendez[i]}
  if (data$exp_condition_nomination[i]=="B" & data$pair[i]==1){data$Q31_know_politician[i] <- data$know.Ruben.Alfredo.Torres.Zavala[i]}
  if (data$exp_condition_nomination[i]=="C" & data$pair[i]==1){data$Q31_know_politician[i] <- data$know.Jose.Erandi.Bermudez.Mendez[i]}
  if (data$exp_condition_nomination[i]=="D" & data$pair[i]==1){data$Q31_know_politician[i] <- data$know.Ruben.Alfredo.Torres.Zavala[i]}
  if (data$exp_condition_nomination[i]=="E" & data$pair[i]==1){data$Q31_know_politician[i] <- data$know.Ruben.Alfredo.Torres.Zavala[i]}
}
for (i in 1:nrow(data)){
  if (data$exp_condition_nomination[i]=="A" & data$pair[i]==2){data$Q31_know_politician[i] <- data$know.Enrique.Torres.Cuadros[i]}
  if (data$exp_condition_nomination[i]=="B" & data$pair[i]==2){data$Q31_know_politician[i] <- data$know.Reynaldo.Francisco.Valdes.Manzo[i]}
  if (data$exp_condition_nomination[i]=="C" & data$pair[i]==2){data$Q31_know_politician[i] <- data$know.Enrique.Torres.Cuadros[i]}
  if (data$exp_condition_nomination[i]=="D" & data$pair[i]==2){data$Q31_know_politician[i] <- data$know.Reynaldo.Francisco.Valdes.Manzo[i]}
  if (data$exp_condition_nomination[i]=="E" & data$pair[i]==2){data$Q31_know_politician[i] <- data$know.Reynaldo.Francisco.Valdes.Manzo[i]}
}
table(data$exp_condition_nomination, data$Q31_know_politician)

# outcome
data$Q31.1_honesty <- NA
data$Q31.1_competence <- NA
data$Q31.1_experienced <- NA
data$Q31.1_academictraining <- NA
data$Q31.2_support <- NA
data$Q31.3_economy <- NA
data$Q31.3_corruption <- NA
data$Q31.3_education <- NA
data$Q31.3_crime <- NA
data$Q31.1_independent <- NA

for (i in 1:nrow(data)){
  if (data$exp_condition_nomination[i]=="A" & data$pair[i]==1){
    data$Q31.1_honesty[i] <- data$Q31.1.1A_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.1A_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.1A_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.1A_5[i]
    data$Q31.2_support[i] <- data$Q31.2.1A[i]
    data$Q31.3_economy[i] <- data$Q31.3.1A_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.1A_2[i]
    data$Q31.3_education[i] <- data$Q31.3.1A_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.1A_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.1A_6[i]
  }
  if (data$exp_condition_nomination[i]=="B" & data$pair[i]==1){
    data$Q31.1_honesty[i] <- data$Q31.1.1B_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.1B_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.1B_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.1B_5[i]
    data$Q31.2_support[i] <- data$Q31.2.1B[i]
    data$Q31.3_economy[i] <- data$Q31.3.1B_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.1B_2[i]
    data$Q31.3_education[i] <- data$Q31.3.1B_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.1B_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.1B_6[i]
  }
  if (data$exp_condition_nomination[i]=="C" & data$pair[i]==1){
    data$Q31.1_honesty[i] <- data$Q31.1.1C_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.1C_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.1C_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.1C_5[i]
    data$Q31.2_support[i] <- data$Q31.2.1C[i]
    data$Q31.3_economy[i] <- data$Q31.3.1C_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.1C_2[i]
    data$Q31.3_education[i] <- data$Q31.3.1C_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.1C_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.1C_6[i]
  }
  if (data$exp_condition_nomination[i]=="D" & data$pair[i]==1){
    data$Q31.1_honesty[i] <- data$Q31.1.1D_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.1D_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.1D_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.1D_5[i]
    data$Q31.2_support[i] <- data$Q31.2.1D[i]
    data$Q31.3_economy[i] <- data$Q31.3.1D_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.1D_2[i]
    data$Q31.3_education[i] <- data$Q31.3.1D_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.1D_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.1D_6[i]
  }
  if (data$exp_condition_nomination[i]=="E" & data$pair[i]==1){
    data$Q31.1_honesty[i] <- data$Q31.1.1E_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.1E_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.1E_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.1E_5[i]
    data$Q31.2_support[i] <- data$Q31.2.1E[i]
    data$Q31.3_economy[i] <- data$Q31.3.1E_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.1E_2[i]
    data$Q31.3_education[i] <- data$Q31.3.1E_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.1E_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.1E_6[i]
  }
}

for (i in 1:nrow(data)){
  if (data$exp_condition_nomination[i]=="A" & data$pair[i]==2){
    data$Q31.1_honesty[i] <- data$Q31.1.2A_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.2A_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.2A_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.2A_5[i]
    data$Q31.2_support[i] <- data$Q31.2.2A[i]
    data$Q31.3_economy[i] <- data$Q31.3.2A_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.2A_2[i]
    data$Q31.3_education[i] <- data$Q31.3.2A_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.2A_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.2A_6[i]
  }
  if (data$exp_condition_nomination[i]=="B" & data$pair[i]==2){
    data$Q31.1_honesty[i] <- data$Q31.1.2B_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.2B_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.2B_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.2B_5[i]
    data$Q31.2_support[i] <- data$Q31.2.2B[i]
    data$Q31.3_economy[i] <- data$Q31.3.2B_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.2B_2[i]
    data$Q31.3_education[i] <- data$Q31.3.2B_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.2B_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.2B_6[i]
  }
  if (data$exp_condition_nomination[i]=="C" & data$pair[i]==2){
    data$Q31.1_honesty[i] <- data$Q31.1.2C_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.2C_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.2C_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.2C_5[i]
    data$Q31.2_support[i] <- data$Q31.2.2C[i]
    data$Q31.3_economy[i] <- data$Q31.3.2C_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.2C_2[i]
    data$Q31.3_education[i] <- data$Q31.3.2C_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.2C_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.2C_6[i]
  }
  if (data$exp_condition_nomination[i]=="D" & data$pair[i]==2){
    data$Q31.1_honesty[i] <- data$Q31.1.2D_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.2D_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.2D_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.2D_5[i]
    data$Q31.2_support[i] <- data$Q31.2.2D[i]
    data$Q31.3_economy[i] <- data$Q31.3.2D_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.2D_2[i]
    data$Q31.3_education[i] <- data$Q31.3.2D_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.2D_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.2D_6[i]
  }
  if (data$exp_condition_nomination[i]=="E" & data$pair[i]==2){
    data$Q31.1_honesty[i] <- data$Q31.1.2E_1[i]
    data$Q31.1_competence[i] <- data$Q31.1.2E_2[i]
    data$Q31.1_experienced[i] <- data$Q31.1.2E_4[i]
    data$Q31.1_academictraining[i] <- data$Q31.1.2E_5[i]
    data$Q31.2_support[i] <- data$Q31.2.2E[i]
    data$Q31.3_economy[i] <- data$Q31.3.2E_1[i]
    data$Q31.3_corruption[i] <- data$Q31.3.2E_2[i]
    data$Q31.3_education[i] <- data$Q31.3.2E_3[i]
    data$Q31.3_crime[i] <- data$Q31.3.2E_5[i]
    data$Q31.1_independent[i] <- data$Q31.1.2E_6[i]
  }
}

data$Q31.1_honesty[data$Q31.1_honesty==99] <- NA
data$Q31.1_competence[data$Q31.1_competence==99] <- NA
data$Q31.1_experienced[data$Q31.1_experienced==99] <- NA
data$Q31.1_academictraining[data$Q31.1_academictraining==99] <- NA
data$Q31.2_support[data$Q31.2_support==99] <- NA
data$Q31.3_economy[data$Q31.3_economy==99] <- NA
data$Q31.3_corruption[data$Q31.3_corruption==99] <- NA
data$Q31.3_education[data$Q31.3_education==99] <- NA
data$Q31.3_crime[data$Q31.3_crime==99] <- NA
data$Q31.1_independent[data$Q31.1_independent==99] <- NA
data$Q31.3_economy <- data$Q31.3_economy - 1
data$Q31.3_corruption <- data$Q31.3_corruption - 1
data$Q31.3_education <- data$Q31.3_education - 1
data$Q31.3_crime <- data$Q31.3_crime - 1

# average response
cols.1 = c("Q31.1_honesty", "Q31.1_competence", "Q31.1_experienced", "Q31.1_academictraining")
data$Q31.1_all<-rowMeans(data[,cols.1], na.rm=FALSE)
summary(data$Q31.1_all)
table(data$Q31.1_all)

# average response
cols.3 = c("Q31.3_economy", "Q31.3_corruption", "Q31.3_education", "Q31.3_crime")
data$Q31.3_all<-rowMeans(data[,cols.3], na.rm=FALSE)
summary(data$Q31.3_all)
table(data$Q31.3_all)

data$Q31_manipulation_information_slang_personality <- data$Q31_manipulation_information_slang ## just for graphical display
data$Q31_manipulation_information_slang_policy <- data$Q31_manipulation_information_slang ## just for graphical display
data$Q31_manipulation_information_slang_independence <- data$Q31_manipulation_information_slang ## just for graphical display
data$Q31_manipulation_information_slang_support <- data$Q31_manipulation_information_slang ## just for graphical display

summary(subset(data, Q31_manipulation_information == 0)$Q31.2_support)
summary(subset(data, Q31_manipulation_information == 1)$Q31.2_support)
summary(subset(data, exp_condition_nomination == "A")$Q31.2_support)
summary(subset(data, exp_condition_nomination == "B")$Q31.2_support)
summary(subset(data, exp_condition_nomination == "C")$Q31.2_support)
summary(subset(data, exp_condition_nomination == "D")$Q31.2_support)
summary(subset(data, exp_condition_nomination == "E")$Q31.2_support)

data.descriptive <- data[c("Q31.1_honesty", "Q31.1_competence", "Q31.1_experienced", "Q31.1_academictraining", "Q31.1_all", 
                           "Q31.3_economy", "Q31.3_corruption", "Q31.3_education", "Q31.3_crime", "Q31.3_all", 
                           "Q31.2_support")]
data.descriptive <- as.data.frame(data.descriptive)


###################################################### 
###### Table 3 Descriptive statistics ############### 
######################################################  

stargazer(data.descriptive,
                 #"age", "male","education", "full_time_job", "part_time_job", "income", "catholic", "mexico_city", "Q31_know_politician", "proxy_conservative",  "positive_reciprocity",  "trust_neighbor", "trust_party","trust_president", "belief_vote_confidentiality", "turnout_2018_election", "satisfaction_2018_election_result" 
          type = "latex",
          covariate.labels = c("Honest", "Competent", "Experienced", "Academically prepared", "Average", 
                               "Improve economy", "Reduce corruption", "Improve education quality", "Fight organized crime", "Average",
                               "Likelihood of voting for the politician"), #,
                              # "Age", "Male", "Education", "Full time job", "Part time job", "Income", "Catholic", "Mexico city", "Know the politician","Conservative",  "Reciprocity",   "Trust in neighbors", "Trust in political parties", "Trust in president", "Trust in ballot secrecy", "Turnout in the 2018 presidential election", "Satisfaction with the result of the 2018 presidential election"), 
          summary.stat = c("n", "mean", "sd", "min", "max"),
          title="Descriptive statistics of respondents", 
          digits=3
)

data$exp_condition_number <- NA
data$exp_condition_number[ data$exp_condition_nomination == "A" ] <- 0
data$exp_condition_number[ data$exp_condition_nomination == "B" ] <- 1
data$exp_condition_number[ data$exp_condition_nomination == "C" ] <- 2
data$exp_condition_number[ data$exp_condition_nomination == "D" ] <- 3
data$exp_condition_number[ data$exp_condition_nomination == "E" ] <- 4
table(data$exp_condition_number)

###################################################### 
###### Appendix D.1 Balance test result #############
######################################################  

summary(aov(exp_condition_number ~ age, data=data))
summary(aov(exp_condition_number ~ male, data=data))
summary(aov(exp_condition_number ~ education, data=data))
summary(aov(exp_condition_number ~ full_time_job, data=data))
summary(aov(exp_condition_number ~ part_time_job, data=data))
summary(aov(exp_condition_number ~ income, data=data))
summary(aov(exp_condition_number ~ catholic, data=data))
summary(aov(exp_condition_number ~ mexico_city, data=data))
summary(aov(exp_condition_number ~ Q31_know_politician, data=data))
summary(aov(exp_condition_number ~ positive_reciprocity, data=data)) #
summary(aov(exp_condition_number ~ trust_neighbor, data=data))
summary(aov(exp_condition_number ~ trust_party, data=data))
summary(aov(exp_condition_number ~ trust_president, data=data))
summary(aov(exp_condition_number ~ proxy_conservative, data=data))
summary(aov(exp_condition_number ~ belief_vote_confidentiality, data=data))
summary(aov(exp_condition_number ~ turnout_2018_election, data=data))
summary(aov(exp_condition_number ~ satisfaction_2018_election_result, data=data))


########################################################################## 
###### Appendix E	Main results: OLS regression tables #############
########################################################################## 

#### Appendix Table E.1.1 Effects of primary information ########
reg.1 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.4 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary + pair
              , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.4, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

#### Appendix Table E.1.2 Effects of primary information #######
reg.6 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.9 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_appointment + pair
                , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.9, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table E.1.3: Effects of information Dedazo ##########
data$Q31_manipulation_information_slang_personality_no_info_baseline <-  data$Q31_manipulation_information_slang_personality  ## this is intended to capture the impact against no info condition

reg.21 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_slang_personality_no_info_baseline + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.22 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_slang_personality_no_info_baseline + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_slang_personality_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_slang_personality_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.25 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.21, reg.22, reg.23, reg.24, reg.25, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


##############################################################
###### Figure 1. Panel A. Personal attribute  #############
#############################################################  
df1 <- coefplot(reg.1, plot=FALSE, name = "Honest", shorten = FALSE)
df2 <- coefplot(reg.2, plot=FALSE, name = "Competent", shorten = FALSE)
df4 <- coefplot(reg.4, plot=FALSE, name = "Experienced", shorten = FALSE)
df5 <- coefplot(reg.5, plot=FALSE, name = "Academically qualified", shorten = FALSE)
df11 <- coefplot(reg.11, plot=FALSE, name = "Average", shorten = FALSE)
df6 <- coefplot(reg.6, plot=FALSE, name = "Honest", shorten = FALSE)
df7 <- coefplot(reg.7, plot=FALSE, name = "Competent", shorten = FALSE)
df9 <- coefplot(reg.9, plot=FALSE, name = "Experienced", shorten = FALSE)
df10 <- coefplot(reg.10, plot=FALSE, name = "Academically qualified", shorten = FALSE)
df12 <- coefplot(reg.12, plot=FALSE, name = "Average", shorten = FALSE)
df21 <- coefplot(reg.21, plot=FALSE, name = "Honest", shorten = FALSE)
df22 <- coefplot(reg.22, plot=FALSE, name = "Competent", shorten = FALSE)
df23 <- coefplot(reg.23, plot=FALSE, name = "Experienced", shorten = FALSE)
df24 <- coefplot(reg.24, plot=FALSE, name = "Academically qualified", shorten = FALSE)
df25 <- coefplot(reg.25, plot=FALSE, name = "Average", shorten = FALSE)

multiple.filtered <- rbind(df1, df2, df4, df5, df11, 
                           df6, df7, df9, df10, df12, 
                           df21, df22, df23, df24, df25)
multiple.filtered<- multiple.filtered[grepl('Q31_manipulation_information', multiple.filtered$Coefficient), ]

multiple.filtered[1, 4] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[1, 3] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[1, 6] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[1, 5] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[2, 4] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[2, 3] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[2, 6] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[2, 5] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[3, 4] <- confint(reg.4, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[3, 3] <- confint(reg.4, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[3, 6] <- confint(reg.4, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[3, 5] <- confint(reg.4, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[4, 4] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[4, 3] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[4, 6] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[4, 5] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[5, 4] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[5, 3] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[5, 6] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[5, 5] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[6, 4] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[6, 3] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[6, 6] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[6, 5] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[7, 4] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[7, 3] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[7, 6] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[7, 5] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[8, 4] <- confint(reg.9, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[8, 3] <- confint(reg.9, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[8, 6] <- confint(reg.9, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[8, 5] <- confint(reg.9, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[9, 4] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[9, 3] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[9, 6] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[9, 5] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[10, 4] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[10, 3] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[10, 6] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[10, 5] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[11, 4] <- confint(reg.21, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[1]
multiple.filtered[11, 3] <- confint(reg.21, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[2]
multiple.filtered[11, 6] <- confint(reg.21, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[1]
multiple.filtered[11, 5] <- confint(reg.21, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[2]
multiple.filtered[12, 4] <- confint(reg.22, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[1]
multiple.filtered[12, 3] <- confint(reg.22, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[2]
multiple.filtered[12, 6] <- confint(reg.22, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[1]
multiple.filtered[12, 5] <- confint(reg.22, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[2]
multiple.filtered[13, 4] <- confint(reg.23, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[1]
multiple.filtered[13, 3] <- confint(reg.23, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[2]
multiple.filtered[13, 6] <- confint(reg.23, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[1]
multiple.filtered[13, 5] <- confint(reg.23, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[2]
multiple.filtered[14, 4] <- confint(reg.24, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[1]
multiple.filtered[14, 3] <- confint(reg.24, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[2]
multiple.filtered[14, 6] <- confint(reg.24, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[1]
multiple.filtered[14, 5] <- confint(reg.24, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[2]
multiple.filtered[15, 4] <- confint(reg.25, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[1]
multiple.filtered[15, 3] <- confint(reg.25, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.90)[2]
multiple.filtered[15, 6] <- confint(reg.25, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[1]
multiple.filtered[15, 5] <- confint(reg.25, "Q31_manipulation_information_slang_personality_no_info_baseline", level=0.95)[2]

multiple.filtered$Coefficient <- as.character(multiple.filtered$Coefficient)
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_primary"] <- "Primary Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_appointment"] <- "Appointment Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_slang_personality_no_info_baseline"] <- "Dedazo info."
multiple.filtered$Coefficient <- factor(multiple.filtered$Coefficient, levels = c( "Dedazo info.", "Appointment Info.", "Primary Info."))
multiple.filtered$Model <- factor(multiple.filtered$Model, levels = c( "Average", "Academically qualified", "Experienced", "Competent", "Honest"))

p1<- ggplot(multiple.filtered, aes(y = Coefficient, x = Value, color = Model)) +
  geom_vline(xintercept = 0, linetype = 2, size = 1, color = "grey") + 
  geom_errorbarh(aes(xmin = LowOuter, xmax = HighOuter), size=  0.5, height = 0, lwd = 0.5, position = position_dodgev(height = 0.7)) + 
  geom_errorbarh(aes(xmin = LowInner, xmax = HighInner), size = 1, height = 0, lwd = 1, position = position_dodgev(height = 0.7)) +
  geom_point(size= 2, position = position_dodgev(height = 0.7), aes(shape=Model))+
  theme_bw(base_size = 14) + xlab("Coefficient Estimate") + ylab("") + 
  ggtitle("Panel A. Personal attributes") +
  theme(plot.title = element_text(size=13),
        legend.justification = c(0, 0),
        legend.background = element_rect(colour="grey80"),
        legend.title.align = .5, 
        legend.text=element_text(size=11), 
        axis.title=element_text(size=11), 
        legend.title = element_blank()) +
  scale_colour_grey(start = .1, end = .1, 
                    name = "Personality evaluation", 
                    breaks = c(0, 1, 2, 3, 4)) +
  guides(shape = guide_legend(reverse=T, override.aes = list(size = 3)))  


### Appendix Table E.2.1: Effects of primary information ######
reg.1 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.3 <-  lm(Q31.3_education  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_primary + pair
               , data=subset(data, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary + pair
              , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.3, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


### Appendix Table E.2.2: Effects of appointment information ######
reg.6 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.8 <-  lm(Q31.3_education  ~ Q31_manipulation_information_appointment + pair
               , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_appointment + pair
                , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.8, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

#### Appendix Table E.2.3: Effects of information Dedazo #####
data$Q31_manipulation_information_slang_policy_no_info_baseline <-  data$Q31_manipulation_information_slang_policy  ## this is intended to capture the impact against no info condition

reg.19 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_slang_policy_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.20 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_slang_policy_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.21 <-  lm(Q31.3_education  ~ Q31_manipulation_information_slang_policy_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_slang_policy_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.19, reg.20, reg.21, reg.23, reg.24, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


##############################################################
###### Figure 1. Panel B Policy-making effectiveness  #############
#############################################################  
df1 <- coefplot(reg.1, plot=FALSE, name = "Improve economy", shorten = FALSE)
df2 <- coefplot(reg.2, plot=FALSE, name = "Reduce corruption", shorten = FALSE)
df3 <- coefplot(reg.3, plot=FALSE, name = "Improve education quality", shorten = FALSE)
df5 <- coefplot(reg.5, plot=FALSE, name = "Solve organized crime problem", shorten = FALSE)
df11 <- coefplot(reg.11, plot=FALSE, name = "Average", shorten = FALSE)
df6 <- coefplot(reg.6, plot=FALSE, name = "Improve economy", shorten = FALSE)
df7 <- coefplot(reg.7, plot=FALSE, name = "Reduce corruption", shorten = FALSE)
df8 <- coefplot(reg.8, plot=FALSE, name = "Improve education quality", shorten = FALSE)
df10 <- coefplot(reg.10, plot=FALSE, name = "Solve organized crime problem", shorten = FALSE)
df12 <- coefplot(reg.12, plot=FALSE, name = "Average", shorten = FALSE)
df19 <- coefplot(reg.19, plot=FALSE, name = "Improve economy", shorten = FALSE)
df20 <- coefplot(reg.20, plot=FALSE, name = "Reduce corruption", shorten = FALSE)
df21 <- coefplot(reg.21, plot=FALSE, name = "Improve education quality", shorten = FALSE)
df23 <- coefplot(reg.23, plot=FALSE, name = "Solve organized crime problem", shorten = FALSE)
df24 <- coefplot(reg.24, plot=FALSE, name = "Average", shorten = FALSE)

multiple.filtered <- rbind(df1, df2, df3, df5, df11, 
                           df6, df7, df8, df10, df12, 
                           df19, df20, df21, df23, df24)

multiple.filtered<- multiple.filtered[grepl('Q31_manipulation_information', multiple.filtered$Coefficient), ]

multiple.filtered[1, 4] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[1, 3] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[1, 6] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[1, 5] <- confint(reg.1, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[2, 4] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[2, 3] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[2, 6] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[2, 5] <- confint(reg.2, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[3, 4] <- confint(reg.3, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[3, 3] <- confint(reg.3, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[3, 6] <- confint(reg.3, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[3, 5] <- confint(reg.3, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[4, 4] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[4, 3] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[4, 6] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[4, 5] <- confint(reg.5, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[5, 4] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[5, 3] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[5, 6] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[5, 5] <- confint(reg.11, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[6, 4] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[6, 3] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[6, 6] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[6, 5] <- confint(reg.6, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[7, 4] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[7, 3] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[7, 6] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[7, 5] <- confint(reg.7, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[8, 4] <- confint(reg.8, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[8, 3] <- confint(reg.8, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[8, 6] <- confint(reg.8, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[8, 5] <- confint(reg.8, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[9, 4] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[9, 3] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[9, 6] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[9, 5] <- confint(reg.10, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[10, 4] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[10, 3] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[10, 6] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[10, 5] <- confint(reg.12, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[11, 4] <- confint(reg.19, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[1]
multiple.filtered[11, 3] <- confint(reg.19, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[2]
multiple.filtered[11, 6] <- confint(reg.19, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[1]
multiple.filtered[11, 5] <- confint(reg.19, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[2]
multiple.filtered[12, 4] <- confint(reg.20, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[1]
multiple.filtered[12, 3] <- confint(reg.20, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[2]
multiple.filtered[12, 6] <- confint(reg.20, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[1]
multiple.filtered[12, 5] <- confint(reg.20, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[2]
multiple.filtered[13, 4] <- confint(reg.21, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[1]
multiple.filtered[13, 3] <- confint(reg.21, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[2]
multiple.filtered[13, 6] <- confint(reg.21, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[1]
multiple.filtered[13, 5] <- confint(reg.21, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[2]
multiple.filtered[14, 4] <- confint(reg.23, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[1]
multiple.filtered[14, 3] <- confint(reg.23, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[2]
multiple.filtered[14, 6] <- confint(reg.23, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[1]
multiple.filtered[14, 5] <- confint(reg.23, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[2]
multiple.filtered[15, 4] <- confint(reg.24, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[1]
multiple.filtered[15, 3] <- confint(reg.24, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.90)[2]
multiple.filtered[15, 6] <- confint(reg.24, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[1]
multiple.filtered[15, 5] <- confint(reg.24, "Q31_manipulation_information_slang_policy_no_info_baseline", level=0.95)[2]

multiple.filtered$Coefficient <- as.character(multiple.filtered$Coefficient)
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_primary"] <- "Primary Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_appointment"] <- "Appointment Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_slang_policy_no_info_baseline"] <- "Dedazo info."
multiple.filtered$Coefficient <- factor(multiple.filtered$Coefficient, levels = c( "Dedazo info.", "Appointment Info.", "Primary Info."))
multiple.filtered$Model <- factor(multiple.filtered$Model, levels = c( "Average", "Solve organized crime problem", "Improve education quality", "Reduce corruption", "Improve economy"))

p2<- ggplot(multiple.filtered, aes(y = Coefficient, x = Value, color = Model)) +
  geom_vline(xintercept = 0, linetype = 2, size = 1, color = "grey") + 
  geom_errorbarh(aes(xmin = LowOuter, xmax = HighOuter), size=  0.5, height = 0, lwd = 0.5, position = position_dodgev(height = 0.7)) + 
  geom_errorbarh(aes(xmin = LowInner, xmax = HighInner), size = 1, height = 0, lwd = 1, position = position_dodgev(height = 0.7)) +
  geom_point(size= 2, position = position_dodgev(height = 0.7), aes(shape=Model))+
  theme_bw(base_size = 14) + xlab("Coefficient Estimate") + ylab("") + 
  ggtitle("Panel B. Policy-making effectiveness") +
  theme(plot.title = element_text(size=13),
        legend.justification = c(0, 0),
        legend.background = element_rect(colour="grey80"),
        legend.title.align = .5, 
        legend.text=element_text(size=11), 
        axis.title=element_text(size=11), 
        legend.title = element_blank()) +
  scale_colour_grey(start = .1, end = .1,
                    name = "Performance evaluation", 
                    breaks = c(0, 1, 2, 3, 4)) +
  guides(shape = guide_legend(reverse=T, override.aes = list(size = 3)))  


#### Appendix Table E.3.1: Effects of primary information ########
reg.electoral.support.1 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary + pair
                                , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.electoral.support.1, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

#### Appendix Table E.3.2: Effects of appointment information #####
reg.electoral.support.2 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment + pair
                                , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.electoral.support.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

#### Appendix Table E.3.3: Effects of information dedazo ######
data$Q31_manipulation_information_slang_support_no_info_baseline <- data$Q31_manipulation_information_slang_support ## this is intended to capture the impact against no info condition

reg.electoral.support.3 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.electoral.support.3,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


##############################################################
###### Figure 1. Panel C Electoral preference   #############
#############################################################  
df1 <- coefplot(reg.electoral.support.1, plot=FALSE, shorten = FALSE)
df2 <- coefplot(reg.electoral.support.2, plot=FALSE, shorten = FALSE)
df3 <- coefplot(reg.electoral.support.3, plot=FALSE, shorten = FALSE)

multiple.filtered <- rbind(df1, df2, df3)
multiple.filtered<- multiple.filtered[grepl('Q31_manipulation_information', multiple.filtered$Coefficient), ]

multiple.filtered[1, 4] <- confint(reg.electoral.support.1, "Q31_manipulation_information_primary", level=0.90)[1]
multiple.filtered[1, 3] <- confint(reg.electoral.support.1, "Q31_manipulation_information_primary", level=0.90)[2]
multiple.filtered[1, 6] <- confint(reg.electoral.support.1, "Q31_manipulation_information_primary", level=0.95)[1]
multiple.filtered[1, 5] <- confint(reg.electoral.support.1, "Q31_manipulation_information_primary", level=0.95)[2]
multiple.filtered[2, 4] <- confint(reg.electoral.support.2, "Q31_manipulation_information_appointment", level=0.90)[1]
multiple.filtered[2, 3] <- confint(reg.electoral.support.2, "Q31_manipulation_information_appointment", level=0.90)[2]
multiple.filtered[2, 6] <- confint(reg.electoral.support.2, "Q31_manipulation_information_appointment", level=0.95)[1]
multiple.filtered[2, 5] <- confint(reg.electoral.support.2, "Q31_manipulation_information_appointment", level=0.95)[2]
multiple.filtered[3, 4] <- confint(reg.electoral.support.3, "Q31_manipulation_information_slang_support_no_info_baseline", level=0.90)[1]
multiple.filtered[3, 3] <- confint(reg.electoral.support.3, "Q31_manipulation_information_slang_support_no_info_baseline", level=0.90)[2]
multiple.filtered[3, 6] <- confint(reg.electoral.support.3, "Q31_manipulation_information_slang_support_no_info_baseline", level=0.95)[1]
multiple.filtered[3, 5] <- confint(reg.electoral.support.3, "Q31_manipulation_information_slang_support_no_info_baseline", level=0.95)[2]

multiple.filtered$Coefficient <- as.character(multiple.filtered$Coefficient)
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_primary"] <- "Primary Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_appointment"] <- "Appointment Info."
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_information_slang_support_no_info_baseline"] <- "Dedazo Info."
multiple.filtered$Coefficient <- factor(multiple.filtered$Coefficient, levels = c( "Dedazo Info.", "Appointment Info.", "Primary Info."))

p3<- ggplot(multiple.filtered, aes(y = Coefficient, x = Value, color = Model)) +
  geom_vline(xintercept = 0, linetype = 2, size = 1, color = "grey") + 
  geom_errorbarh(aes(xmin = LowOuter, xmax = HighOuter), size=  0.5, height = 0, lwd = 0.5, position = position_dodgev(height = 0.7)) + 
  geom_errorbarh(aes(xmin = LowInner, xmax = HighInner), size = 1, height = 0, lwd = 1, position = position_dodgev(height = 0.7)) +
  geom_point(size= 2, position = position_dodgev(height = 0.7), aes(shape=Model))+
  theme_bw(base_size = 14) + xlab("Coefficient Estimate") + ylab("") + 
  ggtitle("Panel C. Electoral Preference") +
  theme(plot.title = element_text(size=13),
        legend.position = "none",
        legend.justification = c(0, 0),
        legend.background = element_rect(colour="grey80"),
        legend.title.align = .5, 
        legend.text=element_text(size=11), 
        axis.title=element_text(size=11), 
        legend.title = element_blank()) +
  scale_colour_grey(start = .1, end = .1, 
                    name = "Electoral Preference", 
                    breaks = c(0, 1, 2, 3, 4)) +
  guides(shape = guide_legend(reverse=T, override.aes = list(size = 3)))  

ggarrange(p1, 
          p2,
          p3,
          nrow=3)
ggsave("figure1.png", width=7, height=7, scale=1.3)


##########################################################
###  F	Main results: using ordered logit models   #######
###########################################################

## Appendix Table F.1.1: Effects of primary information  ###
logit.1 <-  polr(as.factor(Q31.1_honesty)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.2 <-  polr(as.factor(Q31.1_competence)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.3 <-  polr(as.factor(Q31.1_experienced)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.4 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)

stargazer(logit.1, logit.2, logit.3, logit.4, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.1.2: Effects of appointment information  #######
logit.5 <-  polr(as.factor(Q31.1_honesty)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.6 <-  polr(as.factor(Q31.1_competence)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.7 <-  polr(as.factor(Q31.1_experienced)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.8 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)

stargazer(logit.5, logit.6, logit.7, logit.8, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.1.3: Effects of information Dedazo  #######
logit.9 <-  polr(as.factor(Q31.1_honesty)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.10 <-  polr(as.factor(Q31.1_competence)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.11 <-  polr(as.factor(Q31.1_experienced)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.12 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)

stargazer(logit.9, logit.10, logit.11, logit.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


###  Appendix Table F.2.1: Effects of primary information  #######
logit.1 <-  polr(as.factor(Q31.3_economy)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.2 <-  polr(as.factor(Q31.3_corruption)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.3 <-  polr(as.factor(Q31.3_education)  ~  Q31_manipulation_information_primary+ pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)
logit.4 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_primary  + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)

stargazer(logit.1, logit.2, logit.3, logit.4, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.2.2: Effects of appointment information  #####
logit.5 <-  polr(as.factor(Q31.3_economy)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.6 <-  polr(as.factor(Q31.3_corruption)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.7 <-  polr(as.factor(Q31.3_education)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)
logit.8 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)

stargazer(logit.5, logit.6, logit.7, logit.8, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.2.3: Effects of information Dedazo  ####
logit.9 <-  polr(as.factor(Q31.3_economy)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.10 <-  polr(as.factor(Q31.3_corruption)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.11 <-  polr(as.factor(Q31.3_education)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)
logit.12 <-  polr(as.factor(Q31.1_academictraining)  ~  Q31_manipulation_information_appointment + pair
                  , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)

stargazer(logit.9, logit.10, logit.11, logit.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


###  Appendix Table F.3.1: Effects of primary information  #####
logit.1 <-  polr(as.factor(Q31.2_support)  ~  Q31_manipulation_information_primary + pair
                 , data=subset(data, Q31_manipulation_appointment==0), Hess=TRUE)

stargazer(logit.1, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.3.2: Effects of appointment information ####
logit.2 <-  polr(as.factor(Q31.2_support)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"), Hess=TRUE)

stargazer(logit.2,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

###  Appendix Table F.3.3: Effects of information dedazo.  ####
logit.3 <-  polr(as.factor(Q31.2_support)  ~  Q31_manipulation_information_appointment + pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"), Hess=TRUE)

stargazer(logit.3, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


###################################################################
### Appendix G. Additional results: independence from party ########
####################################################################

### Appendix Table G.0.1: Effects of primary information.  ####
reg.independence.1 <- lm(Q31.1_independent  ~ Q31_manipulation_information_primary + pair
                         , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.independence.1, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table G.0.2: Effects of appointment information  ###
reg.independence.2 <- lm(Q31.1_independent  ~ Q31_manipulation_information_appointment + pair
                         , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.independence.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table G.0.3: Effects of information dedazo  ####
data$Q31_manipulation_information_slang_independence_no_info_baseline <- data$Q31_manipulation_information_slang_independence ## this is intended to capture the impact against no info condition

reg.26 <- lm(Q31.1_independent  ~ Q31_manipulation_information_slang_independence_no_info_baseline + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.26,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

#######################################################
### Appendix H.	OLS regression with controls ########
#######################################################

### Appendix Table H.1.1: Effects of primary information  ####
reg.1 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.4 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary + 
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.4, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.1.2: Effects of appointment information  #####
reg.6 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.9 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_appointment +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.9, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.1.3: Effects of information Dedazo  ####
data$Q31_manipulation_information_slang_personality_no_info_baseline <-  data$Q31_manipulation_information_slang_personality  ## this is intended to capture the impact against no info condition

reg.21 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_slang_personality_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.22 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_slang_personality_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_slang_personality_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_slang_personality_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.25 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.21, reg.22, reg.23, reg.24, reg.25, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.2.1: Effects of primary information ####
reg.1 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.3 <-  lm(Q31.3_education  ~ Q31_manipulation_information_primary +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_primary + 
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary + 
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.3, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.2.2: Effects of appointment information ########
reg.6 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.8 <-  lm(Q31.3_education  ~ Q31_manipulation_information_appointment +
               age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
             + Q31_know_politician 
             + positive_reciprocity 
             + trust_neighbor 
             + trust_party   
             + trust_president
             + proxy_conservative
             + belief_vote_confidentiality 
             + turnout_2018_election
             + satisfaction_2018_election_result 
             + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_appointment +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.8, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.2.3: Effects of information Dedazo ########
data$Q31_manipulation_information_slang_policy_no_info_baseline <-  data$Q31_manipulation_information_slang_policy  

reg.19 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_slang_policy_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.20 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_slang_policy_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.21 <-  lm(Q31.3_education  ~ Q31_manipulation_information_slang_policy_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_slang_policy_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline +
                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
              + Q31_know_politician 
              + positive_reciprocity 
              + trust_neighbor 
              + trust_party   
              + trust_president
              + proxy_conservative
              + belief_vote_confidentiality 
              + turnout_2018_election
              + satisfaction_2018_election_result 
              + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.19, reg.20, reg.21, reg.23, reg.24, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.3.1: Effects of primary information ####
reg.electoral.support.1 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary +
                                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
                              + Q31_know_politician 
                              + positive_reciprocity 
                              + trust_neighbor 
                              + trust_party   
                              + trust_president
                              + proxy_conservative
                              + belief_vote_confidentiality 
                              + turnout_2018_election
                              + satisfaction_2018_election_result 
                              + pair
                              , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.electoral.support.1, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.3.2: Effects of appointment information ####
reg.electoral.support.2 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment +
                                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
                              + Q31_know_politician 
                              + positive_reciprocity 
                              + trust_neighbor 
                              + trust_party   
                              + trust_president
                              + proxy_conservative
                              + belief_vote_confidentiality 
                              + turnout_2018_election
                              + satisfaction_2018_election_result 
                              + pair
                              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.electoral.support.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table H.3.3: Effects of information dedazo ####
data$Q31_manipulation_information_slang_support_no_info_baseline <- data$Q31_manipulation_information_slang_support ## this is intended to capture the impact against no info condition

reg.electoral.support.3 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline +
                                age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
                              + Q31_know_politician 
                              + positive_reciprocity 
                              + trust_neighbor 
                              + trust_party   
                              + trust_president
                              + proxy_conservative
                              + belief_vote_confidentiality 
                              + turnout_2018_election
                              + satisfaction_2018_election_result 
                              + pair
                              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.electoral.support.3,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


######################################################################################################################
### Appendix I.	Main results:	excluding respondents who knew politician (without individual-level controls)  ########
#####################################################################################################################

### Appendix Table I.1.1: Effects of primary information  ###
data.uninformed <- subset(data,  Q31_know_politician == 0)

reg.1 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_primary
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.4 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary 
              + pair
              , data=subset(data.uninformed, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.4, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.1.2: Effects of appointment information  ####
reg.6 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.9 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_appointment 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.9, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.1.3: Effects of information Dedazo.    ####
reg.21 <-  lm(Q31.1_honesty  ~ Q31_manipulation_information_slang_personality_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.22 <-  lm(Q31.1_competence  ~ Q31_manipulation_information_slang_personality_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.1_experienced  ~ Q31_manipulation_information_slang_personality_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.1_academictraining  ~ Q31_manipulation_information_slang_personality_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.25 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.21, reg.22, reg.23, reg.24, reg.25, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.2.1: Effects of primary information   ########
reg.1 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.3 <-  lm(Q31.3_education  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.5 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_primary 
             + pair
             , data=subset(data.uninformed, Q31_manipulation_appointment==0))
reg.11 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary 
              + pair
              , data=subset(data.uninformed, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, reg.3, reg.5, reg.11, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.2.2: Effects of appointment information   ####
reg.6 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.7 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.8 <-  lm(Q31.3_education  ~ Q31_manipulation_information_appointment 
             + pair
             , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_appointment 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.12 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.6, reg.7, reg.8, reg.10, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.2.3: Effects of information Dedazo   #####
reg.19 <-  lm(Q31.3_economy  ~ Q31_manipulation_information_slang_policy_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.20 <-  lm(Q31.3_corruption  ~ Q31_manipulation_information_slang_policy_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.21 <-  lm(Q31.3_education  ~ Q31_manipulation_information_slang_policy_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.23 <-  lm(Q31.3_crime  ~ Q31_manipulation_information_slang_policy_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.24 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline 
              + pair
              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.19, reg.20, reg.21, reg.23, reg.24, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.3.1: Effects of primary information.  ###
reg.electoral.support.1 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary 
                              + pair
                              , data=subset(data.uninformed, Q31_manipulation_appointment==0))

stargazer(reg.electoral.support.1, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.3.2: Effects of appointment information  ###
reg.electoral.support.2 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment 
                              + pair
                              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.electoral.support.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table I.3.3: Effects of information dedazo  #####
reg.electoral.support.3 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline 
                              + pair
                              , data=subset(data.uninformed, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.electoral.support.3,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


#######################################################################################################
######### Appendix J.	Additional results: Heterogeneity effect according to politician’s party#########
########################################################################################################

####Appendix Table J.1.1: Information effects on personal attribute (average) ##
reg.int.1 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary*pair
                 , data=subset(data, Q31_manipulation_appointment==0))
reg.int.2 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment*pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.int.3 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline*pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.int.1, reg.int.2, reg.int.3,  
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

####Appendix Table J.2.1: Information effects on policy-making effectiveness (average) ##
reg.int.4 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary*pair
                 , data=subset(data, Q31_manipulation_appointment==0))
reg.int.5 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment*pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.int.6 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline*pair
                 , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.int.4, reg.int.5, reg.int.6, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


####Appendix Table J.3.1: Information effects on vote choice ##
reg.int.7 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary*pair
                , data=subset(data, Q31_manipulation_appointment==0))
reg.int.8 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment*pair
                , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.int.9 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline*pair
                , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.int.7, reg.int.8, reg.int.9,
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

############################################################################
######### Appendix K	Heterogeneous effects by partisan alignment  #########
##############################################################################
data$partisanship_PAN <- NA
for (i in 1:nrow(data)){
  if (is.na(data$Q14.2[i])){
    data$partisanship_PAN[i] <- NA
  }
  else {
    if (data$Q14.2[i] == 2 | data$Q14.2[i] == 5){
      data$partisanship_PAN[i] <- 1
    }
    if (data$Q14.2[i] == 1 | data$Q14.2[i] == 3 | data$Q14.2[i] == 4 | data$Q14.2[i] == 6 | 
        data$Q14.2[i] == 7 | data$Q14.2[i] == 8 | data$Q14.2[i] == 9 | data$Q14.2[i] == 10 |
        data$Q14.2[i] == 11 | data$Q14.2[i] == 12 | data$Q14.2[i] == 13){
      data$partisanship_PAN[i] <- 0
    }
    if (data$Q14.2[i] == 88 | data$Q14.2[i] == 99 ){
      data$partisanship_PAN[i] <- NA
    }
  }
}
table(data$partisanship_PAN)  ##822 respondents are classifed: 119 missing

data$partisanship_PRD <- NA
for (i in 1:nrow(data)){
  if (is.na(data$Q14.2[i])){
    data$partisanship_PRD[i] <- NA
  }
  else {
    if (data$Q14.2[i] == 2 | data$Q14.2[i] == 7){
      data$partisanship_PRD[i] <- 1
    }
    if (data$Q14.2[i] == 1 | data$Q14.2[i] == 3 | data$Q14.2[i] == 4 | data$Q14.2[i] == 5 | 
        data$Q14.2[i] == 6 | data$Q14.2[i] == 8 | data$Q14.2[i] == 9 | data$Q14.2[i] == 10 |
        data$Q14.2[i] == 11 | data$Q14.2[i] == 12 | data$Q14.2[i] == 13){
      data$partisanship_PRD[i] <- 0
    }
    if (data$Q14.2[i] == 88 | data$Q14.2[i] == 99 ){
      data$partisanship_PAN[i] <- NA
    }
  }
}
table(data$partisanship_PRD)  ##822 respondents are classifed: 119 missing

data$partisanship_alignment <- NA
for (i in 1:nrow(data)){
  if (is.na(data$partisanship_PAN[i])){   ## whether PAN or PRD is used does not matter here. 
    data$partisanship_alignment[i] <- NA
  }
  else {
    if (data$pair[i]== 1 & data$partisanship_PAN[i] == 1){
      data$partisanship_alignment[i] <- 1
    }
    if (data$pair[i]== 1 & data$partisanship_PAN[i] == 0){
      data$partisanship_alignment[i] <- 0
    }
    if (data$pair[i]== 2 & data$partisanship_PRD[i] == 1){
      data$partisanship_alignment[i] <- 1
    }
    if (data$pair[i]== 2 & data$partisanship_PRD[i] == 0){
      data$partisanship_alignment[i] <- 0
    }
  }
}
table(data$partisanship_alignment)

### Appendix Table K.1.1: Effects of primary information ########
reg.1 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary + partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary*partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


### Appendix Table K.1.2: Effects of appointment information ########
reg.3 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment + partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.4 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment*partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.3, reg.4, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table K.1.3: Effects of information dedazo ########
reg.5 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline + partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.6 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline*partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.5, reg.6, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


### Appendix Figure K.1.1: Marginal effects of Information on Personality attribute (average) according to partisanship alignment ########
margin.plot.1 <- interplot(m=reg.2, var1="Q31_manipulation_information_primary", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.2 <- interplot(m=reg.4, var1="Q31_manipulation_information_appointment", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+

margin.plot.3 <- interplot(m=reg.6, var1="Q31_manipulation_information_slang_personality_no_info_baseline", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+

ggarrange(margin.plot.1, 
          margin.plot.2,
          margin.plot.3,
          nrow=3)
ggsave("figure_appendix_K_1.png", width=4, height=7, scale=1.5)


### Appendix Table K.2.1: Effects of primary information ########
reg.7 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary + partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.8 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary*partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.7, reg.8, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


### Appendix Table K.2.2: Effects of appointment information ########
reg.9 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment + partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment*partisanship_alignment + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.9, reg.10, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table K.2.3: Effects of information dedazo ########
reg.11 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline + partisanship_alignment + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.12 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline*partisanship_alignment + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.11, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Figure K.2.1: Marginal effects of Information on Policy-making effectiveness (average) according to partisanship alignment ########
margin.plot.4 <- interplot(m=reg.8, var1="Q31_manipulation_information_primary", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+

margin.plot.5 <- interplot(m=reg.10, var1="Q31_manipulation_information_appointment", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+

margin.plot.6 <- interplot(m=reg.12, var1="Q31_manipulation_information_slang_policy_no_info_baseline", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+

ggarrange(margin.plot.4, 
          margin.plot.5,
          margin.plot.6,
          nrow=3)
ggsave("figure_appendix_K_2.png", width=4, height=7, scale=1.5)


### Appendix Table K.3.1: Effects of primary information ########
reg.13 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary + partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.14 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary*partisanship_alignment + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.13, reg.14, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table K.3.2: Effects of appointment information ########
reg.15 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment + partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.16 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment*partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.15, reg.16, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Table K.3.3: Effects of information dedazo. ########
reg.17 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline + partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.18 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline*partisanship_alignment + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.17, reg.18, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Appendix Figure K.3.1: Marginal effects of Information on Likelihood of voting for the politician according to partisanship alignment ########
margin.plot.7 <- interplot(m=reg.14, var1="Q31_manipulation_information_primary", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.8 <- interplot(m=reg.16, var1="Q31_manipulation_information_appointment", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.9 <- interplot(m=reg.18, var1="Q31_manipulation_information_slang_support_no_info_baseline", var2="partisanship_alignment")+
  xlab("Partisanship alignment") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

ggarrange(margin.plot.7, 
          margin.plot.8,
          margin.plot.9,
          nrow=3)
ggsave("figure_appendix_K_3.png", width=4, height=7, scale=1.5)


###############################################################
###Appendix L.	Heterogeneous effects by MORENA partisanship ###
###############################################################
data$partisanship_MORENA <- NA

for (i in 1:nrow(data)){
  if (is.na(data$Q14.2[i])){
    data$partisanship_MORENA[i] <- NA
  }
  else {
    if (data$Q14.2[i] == 1 | data$Q14.2[i] == 4){
      data$partisanship_MORENA[i] <- 1
    }
    if (data$Q14.2[i] == 2 | data$Q14.2[i] == 3 | data$Q14.2[i] == 5 | data$Q14.2[i] == 6 | 
        data$Q14.2[i] == 7 | data$Q14.2[i] == 8 | data$Q14.2[i] == 9 | data$Q14.2[i] == 10 |
        data$Q14.2[i] == 11 | data$Q14.2[i] == 12 | data$Q14.2[i] == 13 ){
      data$partisanship_MORENA[i] <- 0
    }
    if (data$Q14.2[i] == 88 | data$Q14.2[i] == 99 ){
      data$partisanship_MORENA[i] <- NA
    }
  }
}
table(data$partisanship_MORENA) 

## Appendix Table L.1.1: Effects of primary information ##
reg.1 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary + partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.2 <-  lm(Q31.1_all   ~ Q31_manipulation_information_primary*partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.1, reg.2, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Table L.1.2: Effects of appointment information ##
reg.3 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment + partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.4 <-  lm(Q31.1_all  ~ Q31_manipulation_information_appointment*partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.3, reg.4, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


## Appendix Table L.1.3: Effects of information dedazo ##
reg.5 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline + partisanship_MORENA+ pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.6 <-  lm(Q31.1_all  ~ Q31_manipulation_information_slang_personality_no_info_baseline*partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.5, reg.6, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Figure L.1.1: Marginal effects of Information on Personality attribute (average) according to MORENA ##
margin.plot.1 <- interplot(m=reg.2, var1="Q31_manipulation_information_primary", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.2 <- interplot(m=reg.4, var1="Q31_manipulation_information_appointment", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed")

margin.plot.3 <- interplot(m=reg.6, var1="Q31_manipulation_information_slang_personality_no_info_baseline", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") #+
margin.plot.3

ggarrange(margin.plot.1, 
          margin.plot.2,
          margin.plot.3,
          nrow=3)
ggsave("figure_appendix_L_1.png", width=4, height=7, scale=1.5)

## Appendix Table L.2.1: Effects of primary information ##
reg.7 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary + partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.8 <-  lm(Q31.3_all   ~ Q31_manipulation_information_primary*partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.7, reg.8, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Table L.2.2: Effects of appointment information ##
reg.9 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment + partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.10 <-  lm(Q31.3_all  ~ Q31_manipulation_information_appointment*partisanship_MORENA + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.9, reg.10, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Table L.2.3: Effects of information dedazo ##
reg.11 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline + partisanship_MORENA + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.12 <-  lm(Q31.3_all  ~ Q31_manipulation_information_slang_policy_no_info_baseline*partisanship_MORENA + pair
              , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
stargazer(reg.11, reg.12, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Figure L.2.1: Marginal effects of Information on Policy-making effectiveness (average) according to MORENA ##
margin.plot.4 <- interplot(m=reg.8, var1="Q31_manipulation_information_primary", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.5 <- interplot(m=reg.10, var1="Q31_manipulation_information_appointment", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.6 <- interplot(m=reg.12, var1="Q31_manipulation_information_slang_policy_no_info_baseline", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

ggarrange(margin.plot.4, 
          margin.plot.5,
          margin.plot.6,
          nrow=3)
ggsave("figure_appendix_L_2.png", width=4, height=7, scale=1.5)


## Appendix Table L.3.1: Effects of primary information ##
reg.13 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary + partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))
reg.14 <- lm(Q31.2_support  ~ Q31_manipulation_information_primary*partisanship_MORENA + pair
             , data=subset(data, Q31_manipulation_appointment==0))

stargazer(reg.13, reg.14, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Table L.3.2: Effects of appointment information ##
reg.15 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment + partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))
reg.16 <- lm(Q31.2_support  ~ Q31_manipulation_information_appointment*partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="D"))

stargazer(reg.15, reg.16, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Table L.3.3: Effects of information dedazo ##
reg.17 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline + partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))
reg.18 <- lm(Q31.2_support  ~ Q31_manipulation_information_slang_support_no_info_baseline*partisanship_MORENA + pair
             , data=subset(data, exp_condition_nomination=="B" | exp_condition_nomination=="E"))

stargazer(reg.17, reg.18, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

## Appendix Figure L.3.1: Marginal effects of Information on Likelihood of voting for the politician according to MORENA ##
margin.plot.7 <- interplot(m=reg.14, var1="Q31_manipulation_information_primary", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Primary information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.8 <- interplot(m=reg.16, var1="Q31_manipulation_information_appointment", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

margin.plot.9 <- interplot(m=reg.18, var1="Q31_manipulation_information_slang_support_no_info_baseline", var2="partisanship_MORENA")+
  xlab("Partisanship MORENA") +
  ylab("Estimated coefficient of information")+
  ggtitle("Appointment information (Dedazo)") +
  theme_bw()+
  theme(axis.text.x = element_text(size=14), 
        axis.title.x = element_text(size=14),
        axis.text.y = element_text(size=14), 
        axis.title.y = element_text(size=14), 
        legend.text = element_text(size=14),
        legend.title = element_text(size=14)) +
  geom_hline(yintercept = 0, linetype = "dashed") 

ggarrange(margin.plot.7, 
          margin.plot.8,
          margin.plot.9,
          nrow=3)
ggsave("figure_appendix_L_3.png", width=4, height=7, scale=1.5)


###################################################################
### Appendix M.	Difference-in-differences analysis.    #########
###################################################################

## Appendix Table M.0.1: Relative effect of primary over appointment and appointment dedazo (upper panel) ##
reg.5.1 <-  lm(Q31.1_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "E"))
reg.5.3 <-  lm(Q31.3_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "E"))
reg.5.5 <-  lm(Q31.2_support   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "E"))

stargazer(reg.5.1, reg.5.3, reg.5.5, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Figure 2 upper panel (in the body)
df1 <- coefplot(reg.5.1, plot=FALSE, name = "Personal attributes (average)", shorten = FALSE)
df2 <- coefplot(reg.5.3, plot=FALSE, name = "Policy-making effectiveness (average)", horten = FALSE)
df3 <- coefplot(reg.5.5, plot=FALSE, name = "Electoral support", shorten = FALSE)

multiple.filtered <- rbind(df1, df2, df3)
multiple.filtered<- multiple.filtered[grepl('Q31_manipulation_primary', multiple.filtered$Coefficient), ]

multiple.filtered[1, 4] <- confint(reg.5.1, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[1, 3] <- confint(reg.5.1, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[1, 6] <- confint(reg.5.1, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[1, 5] <- confint(reg.5.1, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[2, 4] <- confint(reg.5.1, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[2, 3] <- confint(reg.5.1, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[2, 6] <- confint(reg.5.1, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[2, 5] <- confint(reg.5.1, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered[3, 4] <- confint(reg.5.3, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[3, 3] <- confint(reg.5.3, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[3, 6] <- confint(reg.5.3, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[3, 5] <- confint(reg.5.3, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[4, 4] <- confint(reg.5.3, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[4, 3] <- confint(reg.5.3, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[4, 6] <- confint(reg.5.3, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[4, 5] <- confint(reg.5.3, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered[5, 4] <- confint(reg.5.5, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[5, 3] <- confint(reg.5.5, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[5, 6] <- confint(reg.5.5, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[5, 5] <- confint(reg.5.5, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[6, 4] <- confint(reg.5.5, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[6, 3] <- confint(reg.5.5, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[6, 6] <- confint(reg.5.5, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[6, 5] <- confint(reg.5.5, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered$Coefficient <- as.character(multiple.filtered$Coefficient)
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_primary"] <- "No information"
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_primary:Q31_manipulation_information"] <- "Information"
multiple.filtered$Coefficient <- factor(multiple.filtered$Coefficient, levels = c( "No information", "Information"))
multiple.filtered$Model <- factor(multiple.filtered$Model, levels = c( "Personal attributes (average)", "Policy-making effectiveness (average)", "Electoral support"))

p_1 <- ggplot(multiple.filtered, aes(y = Model, x = Value, color = Coefficient)) +
  geom_vline(xintercept = 0, linetype = 2, size = 1, color = "grey") + 
  geom_errorbarh(aes(xmin = LowOuter, xmax = HighOuter), size=  0.5, height = 0, lwd = 0.5, position = position_dodgev(height = 0.7)) + 
  geom_errorbarh(aes(xmin = LowInner, xmax = HighInner), size = 1, height = 0, lwd = 1, position = position_dodgev(height = 0.7)) +
  geom_point(size= 2, position = position_dodgev(height = 0.7), aes(shape=Coefficient))+
  theme_bw(base_size = 14) + xlab("Coefficient Estimate") + ylab("") + 
  ggtitle("Panel A. Effect of primary (against appointment)") +
  theme(plot.title = element_text(size=13),
        legend.position = "none",
        legend.justification = c(0, 0),
        legend.background = element_rect(colour="grey80"),
        legend.title.align = .5, 
        legend.text=element_text(size=11), 
        axis.title=element_text(size=11), 
        #legend.key.size = unit(20, "pt"),
        legend.title = element_blank()) +
  scale_colour_grey(start = .1, end = .1, 
                    breaks = c(0, 1, 2, 3, 4)) +
  guides(shape = guide_legend(reverse=F, override.aes = list(size = 3))) +
  coord_flip()

## Appendix Table M.0.1: Relative effect of primary over appointment and appointment dedazo (lower panel) ##
reg.5.2 <-  lm(Q31.1_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "D"))
reg.5.4 <-  lm(Q31.3_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "D"))
reg.5.6 <-  lm(Q31.2_support   ~ Q31_manipulation_primary * Q31_manipulation_information
               + pair
               , data=subset(data, exp_condition_nomination != "D"))

stargazer(reg.5.2, reg.5.4, reg.5.6, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

### Figure 2 lower panel (in the body)
df1 <- coefplot(reg.5.2, plot=FALSE, name = "Personal attributes (average)", shorten = FALSE)
df2 <- coefplot(reg.5.4, plot=FALSE, name = "Policy-making effectiveness (average)", horten = FALSE)
df3 <- coefplot(reg.5.6, plot=FALSE, name = "Electoral support", shorten = FALSE)

multiple.filtered <- rbind(df1, df2, df3)
multiple.filtered<- multiple.filtered[grepl('Q31_manipulation_primary', multiple.filtered$Coefficient), ]
multiple.filtered[1, 4] <- confint(reg.5.2, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[1, 3] <- confint(reg.5.2, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[1, 6] <- confint(reg.5.2, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[1, 5] <- confint(reg.5.2, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[2, 4] <- confint(reg.5.2, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[2, 3] <- confint(reg.5.2, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[2, 6] <- confint(reg.5.2, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[2, 5] <- confint(reg.5.2, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered[3, 4] <- confint(reg.5.4, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[3, 3] <- confint(reg.5.4, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[3, 6] <- confint(reg.5.4, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[3, 5] <- confint(reg.5.4, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[4, 4] <- confint(reg.5.4, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[4, 3] <- confint(reg.5.4, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[4, 6] <- confint(reg.5.4, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[4, 5] <- confint(reg.5.4, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered[5, 4] <- confint(reg.5.6, "Q31_manipulation_primary", level=0.90)[1]
multiple.filtered[5, 3] <- confint(reg.5.6, "Q31_manipulation_primary", level=0.90)[2]
multiple.filtered[5, 6] <- confint(reg.5.6, "Q31_manipulation_primary", level=0.95)[1]
multiple.filtered[5, 5] <- confint(reg.5.6, "Q31_manipulation_primary", level=0.95)[2]
multiple.filtered[6, 4] <- confint(reg.5.6, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[1]
multiple.filtered[6, 3] <- confint(reg.5.6, "Q31_manipulation_primary:Q31_manipulation_information", level=0.90)[2]
multiple.filtered[6, 6] <- confint(reg.5.6, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[1]
multiple.filtered[6, 5] <- confint(reg.5.6, "Q31_manipulation_primary:Q31_manipulation_information", level=0.95)[2]
multiple.filtered$Coefficient <- as.character(multiple.filtered$Coefficient)
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_primary"] <- "No information"
multiple.filtered$Coefficient[ multiple.filtered$Coefficient == "Q31_manipulation_primary:Q31_manipulation_information"] <- "Information"
multiple.filtered$Coefficient <- factor(multiple.filtered$Coefficient, levels = c( "No information", "Information"))
multiple.filtered$Model <- factor(multiple.filtered$Model, levels = c( "Personal attributes (average)", "Policy-making effectiveness (average)", "Electoral support"))

p_2 <- ggplot(multiple.filtered, aes(y = Model, x = Value, color = Coefficient)) +
  geom_vline(xintercept = 0, linetype = 2, size = 1, color = "grey") + 
  geom_errorbarh(aes(xmin = LowOuter, xmax = HighOuter), size=  0.5, height = 0, lwd = 0.5, position = position_dodgev(height = 0.7)) + 
  geom_errorbarh(aes(xmin = LowInner, xmax = HighInner), size = 1, height = 0, lwd = 1, position = position_dodgev(height = 0.7)) +
  geom_point(size= 2, position = position_dodgev(height = 0.7), aes(shape=Coefficient))+
  theme_bw(base_size = 14) + xlab("Coefficient Estimate") + ylab("") + 
  ggtitle("Panel B. Effect of primary (against Dedazo)") +
  theme(plot.title = element_text(size=13),
        #legend.position = "none",
        legend.justification = c(0, 0),
        legend.background = element_rect(colour="grey80"),
        legend.title.align = .5, 
        legend.text=element_text(size=11), 
        axis.title=element_text(size=11), 
        #legend.key.size = unit(20, "pt"),
        legend.title = element_blank()) +
  scale_colour_grey(start = .1, end = .1, # if start and end same value, use same colour for all models 
                    #                  name = "Electoral Preference", 
                    breaks = c(0, 1, 2, 3, 4)) +
  guides(shape = guide_legend(reverse=F, override.aes = list(size = 3))) +
  coord_flip()

combined <- p_1 + p_2 + plot_layout(guides = "collect", nrow=2) & theme(legend.position = "bottom")
combined
ggsave("figure2.png", width=8, height=6, scale=1.2)



###################################################################
### Appendix N. Difference-in-differences analysis with controls ##
###################################################################

## Appendix Table N.0.1: Relative effect of primary over appointment and appointment dedazo (upper panel) ##
reg.5.1 <-  lm(Q31.1_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "E"))
reg.5.3 <-  lm(Q31.3_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "E"))
reg.5.5 <-  lm(Q31.2_support   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "E"))

stargazer(reg.5.1, reg.5.3, reg.5.5, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")


## Appendix Table N.0.1: Relative effect of primary over appointment and appointment dedazo (lower panel) ##
reg.5.2 <-  lm(Q31.1_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "D"))
reg.5.4 <-  lm(Q31.3_all   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "D"))
reg.5.6 <-  lm(Q31.2_support   ~ Q31_manipulation_primary * Q31_manipulation_information
               + age + male + education + full_time_job + part_time_job + income + catholic + mexico_city 
               + Q31_know_politician 
               + positive_reciprocity 
               + trust_neighbor 
               + trust_party   
               + trust_president
               + proxy_conservative
               + belief_vote_confidentiality 
               + turnout_2018_election
               + satisfaction_2018_election_result 
               + pair
               , data=subset(data, exp_condition_nomination != "D"))

stargazer(reg.5.2, reg.5.4, reg.5.6, 
          digits = 3,
          star.cutoffs = c(0.10, 0.05, 0.01), 
          type="latex")

